﻿using BCEntity.TMS.RedPacket.RedPacketType;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BCData.TMS.RedPacket.RedPacketType
{
    public interface IRedPacketTypeData
    {
        /// <summary>
        /// 添加
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        Task<RedPacketTypeEntity> InsertAsync(RedPacketTypeEntity entity);
        /// <summary>
        /// 修改
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        Task<RedPacketTypeEntity> UpdateAsync(RedPacketTypeEntity entity);
        /// <summary>
        /// 获取红包类型信息
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        Task<RedPacketTypeEntity> GetSingle(long redPacketTypeId);
        /// <summary>
        /// 获取红包类型列表
        /// </summary>
        /// <param name="isEnabled"></param>
        /// <returns></returns>
        Task<IEnumerable<RedPacketTypeEntity>> GetList(bool? isEnabled);
        /// <summary>
        /// 获取红包类型分页
        /// </summary>
        /// <param name="isEnabled"></param>
        /// <returns></returns>
        Task<(IEnumerable<RedPacketTypeEntity>,int)> Query(bool? isEnabled, int pageIndex,int pageSize);
        
    }
}
